﻿using BPMN.Domain.Entity;
using BPMN.Domid.Model.Users;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPMN.infarstrue
{
    /// <summary>
    /// 配置上下文类
    /// </summary>
    public class BPMNDbContext:DbContext
    {
        public BPMNDbContext(DbContextOptions<BPMNDbContext> options) : base(options) { }
        /// <summary>
        /// 用户信息表
        /// </summary>
        public virtual DbSet<User>? User { get; set; }
        /// <summary>
        /// 用户角色表
        /// </summary>
        public virtual DbSet<UserRole>? UserRole { get; set; }
        /// <summary>
        /// 角色表
        /// </summary>
        public virtual DbSet<Role>? Role { get; set; }
        /// <summary>
        /// 权限表
        /// </summary>
        public virtual DbSet<Permission>? Permission { get; set; }
        /// <summary>
        /// 角色权限表
        /// </summary>
        public virtual DbSet<RolePermission>? RolePermission { get; set; }
    }
}
